package com.tl.app.service.impl;

import java.util.List;
import com.tl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tl.app.mapper.AppGradeUserLogMapper;
import com.tl.app.domain.AppGradeUserLog;
import com.tl.app.service.IAppGradeUserLogService;

/**
 * 升级等级记录Service业务层处理
 * 
 * @author suhp
 * @date 2024-07-07
 */
@Service
public class AppGradeUserLogServiceImpl implements IAppGradeUserLogService 
{
    @Autowired
    private AppGradeUserLogMapper appGradeUserLogMapper;

    /**
     * 查询升级等级记录
     * 
     * @param id 升级等级记录主键
     * @return 升级等级记录
     */
    @Override
    public AppGradeUserLog selectAppGradeUserLogById(Long id)
    {
        return appGradeUserLogMapper.selectAppGradeUserLogById(id);
    }

    /**
     * 查询升级等级记录列表
     * 
     * @param appGradeUserLog 升级等级记录
     * @return 升级等级记录
     */
    @Override
    public List<AppGradeUserLog> selectAppGradeUserLogList(AppGradeUserLog appGradeUserLog)
    {
        return appGradeUserLogMapper.selectAppGradeUserLogList(appGradeUserLog);
    }

    /**
     * 新增升级等级记录
     * 
     * @param appGradeUserLog 升级等级记录
     * @return 结果
     */
    @Override
    public int insertAppGradeUserLog(AppGradeUserLog appGradeUserLog)
    {
        appGradeUserLog.setCreateTime(DateUtils.getNowDate());
        return appGradeUserLogMapper.insertAppGradeUserLog(appGradeUserLog);
    }

    /**
     * 修改升级等级记录
     * 
     * @param appGradeUserLog 升级等级记录
     * @return 结果
     */
    @Override
    public int updateAppGradeUserLog(AppGradeUserLog appGradeUserLog)
    {
        appGradeUserLog.setUpdateTime(DateUtils.getNowDate());
        return appGradeUserLogMapper.updateAppGradeUserLog(appGradeUserLog);
    }

    /**
     * 批量删除升级等级记录
     * 
     * @param ids 需要删除的升级等级记录主键
     * @return 结果
     */
    @Override
    public int deleteAppGradeUserLogByIds(Long[] ids)
    {
        return appGradeUserLogMapper.deleteAppGradeUserLogByIds(ids);
    }

    /**
     * 删除升级等级记录信息
     * 
     * @param id 升级等级记录主键
     * @return 结果
     */
    @Override
    public int deleteAppGradeUserLogById(Long id)
    {
        return appGradeUserLogMapper.deleteAppGradeUserLogById(id);
    }
}
